﻿/******************************************************************************
 * Name         : LoginPlayerFactory.hpp
 * Author       : 671643387
 * Date         : 2015年9月21日
 * Description  :
 *****************************************************************************/

#ifndef LOGIN_SERVER_PLAYER_LOGINPLAYERFACTORY_HPP_
#define LOGIN_SERVER_PLAYER_LOGINPLAYERFACTORY_HPP_

#include <boost/shared_ptr.hpp>
#include <common/player/PlayerFactory.hpp>
#include "LoginPlayer.hpp"

namespace sxr
{
    namespace login_server
    {
        class LoginPlayerFactory;
        typedef boost::shared_ptr<LoginPlayerFactory> LoginPlayerFactoryPtr;

        class LoginPlayerFactory : public common::PlayerFactory
        {
        public:
            LoginPlayerFactory(void);
            virtual ~LoginPlayerFactory(void);

        public:
            LoginPlayerPtr create(int id, dev::net::TcpConnectionPtr& conn);

        private:
            void destroyPlayer(LoginPlayer* player);
        };
    }
}

#endif /* LOGIN_SERVER_PLAYER_LOGINPLAYERFACTORY_HPP_ */
